package com.example.service;

import com.example.service.impl.DeptHystrixFallBackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: 21050134
 * @date: 2023/10/8 14:08
 * @description:
 */
//添加为容器内的一个组件
@Component
// 服务提供者提供的服务名称，即 application.name
@FeignClient(value = "MICROSERVICECLOUDPROVIDERDEPTHYSTRIX",fallback = DeptHystrixFallBackService.class)
public interface DeptHystrixService {

	@RequestMapping(value="/dept/hystrix/ok/{id}")
	public String deptInfo_Ok(@PathVariable("id") Integer id);


	@RequestMapping(value="/dept/hystrix/timeout/{id}")
	public String deptInfo_Timeout(@PathVariable("id") Integer id);
}
